public class Text {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode  root = binaryTree.createTree();
        binaryTree.preOrder(root);
        System.out.println();
        binaryTree.inOrder(root);
        System.out.println();
        binaryTree.posOrder(root);
        System.out.println();
        System.out.println("该二叉树节点总数为："+binaryTree.nodeSum(root));
        System.out.println("该二叉树的叶子节点总数为："+binaryTree.leafNodeSum(root));
        System.out.println("该二叉树的高度为："+binaryTree.getHeight(root));
        System.out.println(binaryTree.findValue(root,'S'));
        System.out.println(binaryTree.findValue(root,'H'));
        System.out.println(binaryTree.kLevelNode(root,1));
        System.out.println(binaryTree.kLevelNode(root,2));
        System.out.println(binaryTree.kLevelNode(root,3));
        System.out.println(binaryTree.kLevelNode(root,4));
        binaryTree.levelOrder1(root);
    }
}
